package com.example.hcbmsm.controller;

import com.example.hcbmsm.domain.Pre;
import com.example.hcbmsm.service.PreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author Xinghm
 * @version 1.0
 * @since 2024/11/1 16:22
 */
@RestController
@CrossOrigin
@RequestMapping("/pre")
public class PreController {
    @Autowired
    private PreService preService;
    @PostMapping("/add")
    public Map add(@RequestBody Pre pre) {
        return preService.add(pre);
    }
}
